import groovyx.net.ws.WSServer

class MathService {
    double add(double arg0, double arg1) {
      return (arg0 + arg1)
    }
    double square(double arg0) {
      return (arg0 * arg0)
    }

    Result[] dodaj(double arg0, double arg1){
    	return null
    	// return new Result(arg0:arg0, result:arg0+arg1, arg1: arg1, desc:"dodawanie " + arg0 + " do " + arg1)
    }
    
    static void main(args) {
    	def server = new WSServer()

    	server.setNode("MathService", "http://localhost:6980/MathService")
	}
}